home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / edit / njs30exe.zip / NJSTAR3.DOC < prev    next >
Text File  |  1994-02-15  |  47KB  |  955 lines

  1. (This is the third part of NJSTAR USER'S MANUAL. Read NJSTAR2.DOC first)
  2. =============================================================================
  3.  
  4. 14. FILE CONVERSION
  5. ===================
  6.  
  7. This section describes several file conversion options provided  by  NJStar.
  8. All items listed here can be found under "Output" (╩Σ│÷ ╫¬╗╗)  in  the  main
  9. menu.
  10.  
  11. NJSTAR uses the GB (Guo Biao ╣·▒Ω) coding standard. All other  formats  need
  12. some kind of conversion. NJSTAR provides the following  commands  to  handle
  13. Big5, Hz and Zw coding.
  14.  
  15. FUNCTION   <ReadBig5>  [Ctrl+X+B]      ╢┴┤≤╬σ┬δ       Read Big5 
  16.  
  17. This command reads a Big5 file into memory and converts it into GB, so  that
  18. a Big5 file can be edited in NJSTAR.
  19.  
  20. BIG5 is a de facto standard for un-simplified Chinese characters widely used
  21. in Taiwan and Hong Kong. The Big5 standard is also  supported  by  Microsoft
  22. Chinese Windows.  The  Big5  coding  scheme  includes  13,000  un-simplified
  23. Chinese characters.
  24.  
  25. See PROGRAM USAGE in this manual for the '-b' option on the command line.
  26.  
  27. NJStar recognizes if the current file is a Big5 file after it is loaded with
  28. the '-b' command line option. However, when saving the file with  <SaveFile>
  29. or <File>, it will save the file in GB format. To  save  the  file  in  Big5
  30. format, use the <SaveBig5> function as described below:
  31.  
  32. FUNCTION   <SaveBig5>  [Ctrl+X+^B]     ┤µ┤≤╬σ┬δ       Save Big5 
  33.  
  34. Saves the current file to disk in Big5 format. The file can then be imported
  35. into any Big5 System, such as ETen, KC and Microsoft Chinese Windows. NJSTAR
  36. converts GB to Big5 intelligently. It solves the problem of one GB character
  37. to many  Big5  character  mapping  by  using  artificial  intelligence.  The
  38. conversion is NOT 100% perfect. If you are going to publish  it  in  a  Big5
  39. system, you are advised to check it carefully  beforehand.  If  you  find  a
  40. conversion error, please inform the author, so that conversion accuracy  can
  41. be improved in the next version.
  42.  
  43. FUNCTION   <zWEditFile>            ╢┴zW╬─╝■
  44.  
  45. This function has been removed from V3.0. The same result can be achieved by
  46. using <EditFile> + <zWDecode>.
  47.  
  48. The zW format was initially proposed by  Yagui  Wei  and  Ed  Lai,  for  the
  49. purpose of transferring GB files via mainframe networks in  ASCII  mode.  GB
  50. files use extended ASCII characters for internal  coding.  These  characters
  51. cannot be transferred  in  ASCII  mode,  say,  as  an  e-mail  message,  via
  52. mainframe networks. Therefore, one of possible ways to transfer those  files
  53. in ASCII format is to use one of the popular  UUENCODE.EXE  or  UUENCODE.COM
  54. programs. But an unencoded file has a great amount of overhead data so  that
  55. the resultant file size is much bigger,  33.33%  larger  than  the  original
  56. file. The zW format uses smaller overhead data, yet the resultant  file  can
  57. be transferred in ASCII format. There are some zW viewers available  for  PC
  58. computers, so that users can read directly a Chinese message in zW format.
  59.  
  60. In a zW file:
  61.  
  62.      1)   Each line starts with a string of "zW," with a max length of 78      
  63.           characters;
  64.  
  65.      2)   Codes for Chinese characters (ASCII 161-254) are masked with
  66.           the high bit off, that is, shifted by 128 in decimal value;
  67.  
  68.      3)   The End of Line character is preceded with a "#" character;
  69.  
  70.      4)   All other ASCII characters are preceded with a blank character.
  71.  
  72. For example, the following Chinese line
  73.  
  74.     ─╧╝½╨╟(NJSTAR)╩╟╬╥╧▓░«╡─╓╨╬─╬─╩Θ┤ª└φ╧╡═│.
  75.  
  76. will be encoded in Zw format as
  77.  
  78. zW  DO<+PG ( N J S T A R )JGNRO20.5DVPNDNDJi4&@mO5M3 .#
  79.  
  80.  
  81. Please see PROGRAM USAGE in this manual for the '-zW' option at the  command
  82. line.
  83.  
  84. NJStar will recognize if the current file is a zW file after  it  is  loaded
  85. with the '-zW' Command line option. When the file is later saved, it will be
  86. in zW format. To change the format to GB, users need to use <SaveAs> to save
  87. it with another file name.
  88.  
  89. FUNCTION   <zWDecode>      [Shift+F7]       ╥δzW╬─╝■       zW Decode
  90.  
  91. Converts a zW file in the NJSTAR buffer to GB format.
  92.  
  93. If a zW format file is loaded without the <zWEditFile> command, NJStar  will
  94. simply handle it as a GB file without Chinese characters. This function  can
  95. thus be used to decode the current zW file to GB  format.  After  that,  the
  96. file will be saved in GB format.
  97.  
  98. FUNCTION   <zWSaveFile>    [Shift+F6]       ┤µzW╬─╝■       zW SaveFile
  99.  
  100. Encodes the current file in zW format and saves the result to  disk  with  a
  101. user specified  file  name.  When  prompted,  you  can  enter  a  file  name
  102. (recommend a '.zw' extension), with drive name and full path  if  necessary.
  103. NJStar will ask the user to confirm the file name if it exists.
  104.  
  105. Since the resultant file is in zW format, you can send the file through  the
  106. mainframe network in ASCII mode.
  107.  
  108. FUNCTION   <HzEditFile>    [Shift+F4]       ╢┴Hz╬─╝■       Hz EditFile
  109.  
  110. Loads a file in Hz format, and then decodes it for display in Chinese.
  111.  
  112. Hz format, proposed collectively and finalized by Fung F.  Lee,  is  another
  113. format dedicated for transferring Chinese  files  via  a  computer  network.
  114. Generally, it uses less overhead data than  zW  format  in  conversion,  and
  115. covers more loopholes in zW format.
  116.  
  117. Hz format keeps the original hard line setting. Thus, a line is divided into
  118. different segment,  grouped  by  the  following  four  types  of  data.  The
  119. following coding schemes and the identifiers are applied to different  types
  120. of data:
  121.  
  122.                ASCII CODE        ENCODING        HZ Format
  123.                =============     ===========     ==========
  124.                c =   0 -  31     C = c +  32     ~(C~)
  125.                c =  32 - 127     C = c             C   (no identifier)
  126.                c = 128 - 160     C = c -  96     ~[C~]
  127.                c = 161 - 254     C = c - 128     ~{C~}
  128.  
  129. For example, the following Chinese line
  130.  
  131.     ─╧╝½╨╟(NJSTAR)╩╟╬╥╧▓░«╡─╓╨╬─╬─╩Θ┤ª└φ╧╡═│.
  132.  
  133. will be encoded in Hz format as
  134.  
  135.     ~{DO<+PG~}(NJSTAR)~{JGNRO20.5DVPNDNDJi4&@mO5M3~}.
  136.  
  137. NJStar will remember that the current file is a Hz file after it  is  loaded
  138. with this command or with the '-Hz' command line  option.  When  saving  the
  139. file, it will be in the Hz format. To change  the  format  to  GB,  use  the
  140. <SaveAs> function to save it with another name.
  141.  
  142. Please see PROGRAM USAGE in this manual for the '-Hz' option on the  command
  143. line.
  144.  
  145. FUNCTION   <HzDecode>      [Shift+F3]       ╥δHz╬─╝■       Hz Decode
  146.  
  147. Converts a Hz file in NJSTAR buffer to GB format.
  148.  
  149. If a Hz format file is loaded without using the <HzEditFile> command, NJStar
  150. will simply handle it as a GB file without Chinese  characters.  Thus,  this
  151. function can be used to decode the current Hz file into GB format; the  file
  152. will be saved in GB format.
  153.  
  154. FUNCTION   <HzSaveFile>    [Shift+F2]       ┤µHz╬─╝■       Hz Savefile
  155.  
  156. Encodes the current file in Hz format and saves the results to disk  with  a
  157. user specified file name. When prompted, enter  a  file  name  (recommended:
  158. '.hz' extension), with drive name and full path if  necessary.  NJStar  will
  159. ask to confirm the file name if it exists.
  160.  
  161. As mentioned above, the Hz format does not change the original line  length.
  162. This could cause some problems with ASCII transfer over  computer  networks.
  163. Thus, when a resultant line is longer than  79  characters,  NJStar  adds  a
  164. "soft return" mark as the 79th character and then wraps the line to the next
  165. line. The "soft return" mark is a [~] followed by a hard return (LF CR).
  166.  
  167. Since the resultant file is in Hz format, users may send  the  file  in  the
  168. mainframe network in ASCII mode.
  169.  
  170. FUNCTION   <PcxSaveFile>   [Shift+F5]      ╩Σ│÷ PCX        Create PCX
  171.  
  172. Creates a set of PCX files (one file per page) from the  current  file.  The
  173. purpose of this function is mainly to help users  to  send  a  GB  file  via
  174. computerized fax equipment.
  175.  
  176. A GB file normally is not supported by fax software. But PCX  is  a  popular
  177. graphic format, supported by many fax software packages. This  function  can
  178. be used  to  convert  the  current  file  to  PCX  files,  to  be  sent